<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="teacherList" checkbox="true" fitColumns="true" title="教师表" actionUrl="expReportUploadController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="编号"  field="courseSchedule.teachItem.itemNo"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="课程名称"  field="courseSchedule.lessonInfo.lessonName"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验名称"  field="courseSchedule.teachItem.itemName"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验日期"  field="courseSchedule.courseDate"   formatter="yyyy-MM-dd"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="报告模板" field="opt2" width="100" formatterjs="downloadTemplate"></t:dgCol>
 
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgFunOpt  funname="uploadRpt(id)" title="上传报告" />   
  </t:datagrid>
  </div>
</div>
<script type="text/javascript"> 

function downloadTemplate(id1,id2){
	console.log("1->"+id1)
	console.log("2->"+id2)
}

 	function uploadRpt(id){
 		 $.dialog({
			  	id:'xxx',
				content: 'url:expReportUploadController.do?showUpload&id='+id,
				lock : true,
				zIndex: getzIndex(), 
				parent:frameElement.api,
				width:480,
				height:350,
				title:'上传实验报告', 
				opacity : 0.3,
				cache:false,
			    ok: function(){
			    	var iframe = this.iframe.contentWindow;
			    	var len = $('input[name=attachId]',iframe.document).length;
			    	if(len == 0){
			    		tip('请选择实验报告');
			    		return false;
			    	}
			    	$('#btn_sub', iframe.document).click();
			    	return false;
			    },
			    cancelVal: '关闭',
			    cancel: true /*为true等价于function(){}*/
		});
 	}
 
 </script>